package com.acme.bankapp.domain.bank;

public class SavingAccount extends AbstractAccount
{
	public SavingAccount(final double amount)
	{
		super(amount);
	}
	
	@Override
	public void deposit(final double amount)
	{
		this.balance += amount; 
	}
	
	@Override
	public void withdraw(final double amount)
	{
		if (amount < this.balance)
		{
			this.balance -= amount;
		}
		else
		{
			System.out.println("There is not enough " + 
					"money on your saving account");
		}
	}
	
	@Override
	public double maximumAmountToWithdraw()
	{
		return this.balance;
	}
}
